package num237;

/**
 * 237. 删除链表中的节点
 * 题目：https://leetcode-cn.com/problems/delete-node-in-a-linked-list/
 * 三叶姐题解: https://leetcode-cn.com/problems/delete-node-in-a-linked-list/solution/gong-shui-san-xie-jian-dan-lian-biao-mo-rovcb/
 * 三叶姐
 */
public class Solution {
    public void deleteNode(ListNode node) {
        node.val = node.next.val;
        node.next = node.next.next;
    }
}

class ListNode {
    int val;
    ListNode next;

    ListNode(int x) {
        val = x;
    }
}

